package com.ddwl.user.model;

import com.ddwl.schema.model.Location;
import lombok.Getter;
import lombok.Setter;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.index.GeoSpatialIndexType;
import org.springframework.data.mongodb.core.index.GeoSpatialIndexed;
import org.springframework.data.mongodb.core.mapping.Document;

import java.time.Instant;

/**
 * @author Fu Zhaohui
 * @version 1.0.0
 * @date 2021/6/1 10:17
 */
@Getter
@Setter
@Document(collection = "sys_track")
public class Track {

    @Id
    private String id;
    /**
     *
     */
    private String userId;
    /**
     * 设备Mac
     */
    private String mac;
    /**
     * 定位信息
     */
    @GeoSpatialIndexed(type= GeoSpatialIndexType.GEO_2DSPHERE)
    private Location loc;
    /**
     * wifi
     */
    private String wifi;
    /**
     * 创建时间
     */
    private Instant gmtCreated;
}
